//Copyright 2009 Dominik Punz
//
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.

#ifndef applicationConfiguration_h__110543
#define applicationConfiguration_h__110543

#include "jniEnvironment.h"
#include "jniString.h"
#include "jniReference.h"
#include <OleAuto.h>
#include <string>
#include <set>
#include <jni.h>

class CJtfBaseState
{
public:
  CJtfBaseState(BSTR executableOrModulePattern, BSTR commandLineOrUrl, BSTR mainWindowLocator, BSTR techDomains);
  ~CJtfBaseState();
  
  jobject GetBaseState();
  jobject GetBrowserBaseState();
  jobjectArray GetTechDomainsArray() { return jarrTechDomains; }
  jstring GetExecutable() { return jstrExecutable.JString(); }
  jstring GetCommandLine() { return jstrCommandLineOrUrl.JString(); }
  jstring GetUrl() { return jstrCommandLineOrUrl.JString(); }
  jstring GetMainWindowLocator() { return jstrMainWindow.JString(); }

private:
  CJtfBaseState(const CJtfBaseState& other);

private:
  CJniEnvironment jni;
  CJniString jstrExecutable;
  CJniString jstrCommandLineOrUrl;
  CJniString jstrMainWindow;
  jobjectArray jarrTechDomains;
  jobject jobjBrowserBaseState;
  jobject jobjBaseState;
};


#endif // applicationConfiguration_h__110543